home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / program / gtld3656.lha / GadUtil / Docs / AutoDocs / 01.GU_LayoutGadgetsA < prev    next >
Text File  |  1995-06-18  |  3KB  |  85 lines

  1. gadutil.library/GU_LayoutGadgetsA              gadutil.library/LayoutGadgetsA
  2.  
  3.    NAME
  4.     GU_LayoutGadgetsA -- Formats an array of GadTools gadgets.
  5.  
  6.    SYNOPSIS
  7.     gad_info = GU_LayoutGadgetsA(gad_list, gadgets, screen, taglist)
  8.     D0,A0                        A0        A1       A2      A3
  9.  
  10.     APTR GU_LayoutGadgetsA(struct Gadget **, struct LayoutGadget *,
  11.         struct Screen *, struct TagItem *);
  12.  
  13.    FUNCTION
  14.     Creates a laid-out gadget list from a LayoutGadget array, which
  15.     describes each gadget you want to create. Gadgets you create can
  16.     be any of the gadget kinds supported by GadTools, as well as any
  17.     of the extended gadget kinds provided by GadUtil.
  18.     The gadgets created by this routine, can easily be defined so that
  19.     they adjust their sizes and positions to accomodate fonts of any
  20.     size, and also adapt to different locale strings.
  21.     
  22.    INPUTS
  23.     gad_list - a pointer to the gadget list pointer. This will be
  24.            ready to pass to OpenWindowTagList() or AddGList().
  25.  
  26.     gadgets - an array of LayoutGadget structures. Each element in
  27.           the array describes one of the gadgets that you will
  28.           be creating. Each LayoutGadget structure in the array
  29.           should be initialized as follows:
  30.  
  31.           lg_GadgetID - the ID for this gadget. An ID of -1
  32.                 terminates the array.
  33.  
  34.           lg_LayoutTags - tags that describes each gadget to
  35.                   create. These tags is used to calculate
  36.                   positions, sizes and other attributes
  37.                   of the created gadgets.
  38.  
  39.           lg_GadToolsTags - additional tags for GadTools gadgets.
  40.                     This would be the same set of tags that
  41.                     you might pass to CreateGadgetA() if
  42.                     you were using GadTools directly.
  43.  
  44.           lg_Gadget - the pointer to the Gadget structure created
  45.                   for this gadget will be placed here. You
  46.                   should initialize this field to NULL. The
  47.                   gadget structure created should be considered
  48.                   READ ONLY! This field will contain a pointer
  49.                   to a struct BBoxData, if the created gadget
  50.                   kind is a BEVELBOX_KIND.
  51.  
  52.           Assembly language programmers can use the macro GADGET:
  53.  
  54.             GADGET GadgetID, Gad_LayoutTags, Gad_GadToolsTags
  55.  
  56.     screen - a pointer to the screen that the gadgets will be created
  57.          for. This is required, so that the layuot routines can
  58.          get display info about the screen where the rendering
  59.          will be done. Use LockPubScreen() to use a public screen,
  60.          or OpenScreenTagList(), if you want to use your own screen.
  61.  
  62.     taglist - pointer to a taglist (see in a later release of this
  63.           library for allowed tags, or click here to jump to the
  64.           PRELIMINARY DOCS for this function).
  65.  
  66.    RESULT
  67.     gad_info - a pointer to a private structure. You must keep this
  68.            value and pass it to GU_FreeLayoutGadgets() later on
  69.            in order to free up all resources used by your gadgets.
  70.            This pointer is also used in a lot of other functions
  71.            in this library.
  72.  
  73.    NOTES
  74.     You must be careful with the taglist in the lg_LayoutTags field.
  75.     Tags are processed sequentally in the order you give them in, and
  76.     if a tag references another gadget (eg. the GL_TopRel tag), then
  77.     processing of the current gadget halts while the referenced gadget
  78.     is processed (if it has not already been processed). Problems can
  79.     occur if this gadget refers back to the original gadget that
  80.     referenced if, if it is referring to a field that has not yet been
  81.     processed in that gadget.
  82.  
  83.    SEE ALSO
  84.     GU_FreeLayoutGadgets(), GU_CreateGadgetA(), gadtools/CreateGadgetA()
  85.